import { defineStore } from 'pinia'

const useTest = defineStore('test', {
  state: () => {
    return {
      counter: 0,
      name: 'ydw',
      isAdmin: true,
    }
  },

  actions: {
    dataReset() {
      this.$reset()
    },
  },

  getters: {
    doubleCounter(state) {
      return state.counter + 1
    },
  },
})

export default useTest
